﻿<Window x:Class="Mosaic.Windows.Options"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
        xmlns:Properties="clr-namespace:Mosaic.Properties"
        Title="{x:Static Properties:Resources.OptionsWindowTitle}" 
        d:DesignHeight="768" d:DesignWidth="1024"
        WindowStartupLocation="CenterScreen" WindowStyle="None" ResizeMode="NoResize" Background="White" Foreground="Black"
        SourceInitialized="WindowSourceInitialized" Closed="WindowClosed">
    <Window.Resources>
        <Storyboard x:Key="LoadAnim">
            <DoubleAnimation Storyboard.TargetProperty="Left" To="0" Duration="0:0:0.25" AccelerationRatio="0.3" DecelerationRatio="0.7"/>
            <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.25" AccelerationRatio="0.3" DecelerationRatio="0.7"/>
        </Storyboard>
        <Storyboard x:Key="UnloadAnim" Completed="UnloadAnimCompleted">
            <DoubleAnimation Storyboard.TargetProperty="Left" Duration="0:0:0.25" AccelerationRatio="0.7"/>
        </Storyboard>
    </Window.Resources>
    <DockPanel Name="Root" TextOptions.TextFormattingMode="Display">
        <Grid DockPanel.Dock="Bottom">
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,30,30">
                <Button Name="OkButton" Style="{StaticResource MetroButton}" Content="{x:Static Properties:Resources.OptionsOkButton}" MinWidth="125" Margin="0,0,7,0" Click="OkButtonClick"/>
                <Button Name="CancelButton" Style="{StaticResource MetroButton}" Content="{x:Static Properties:Resources.OptionsCancelButton}" MinWidth="125" Margin="0,0,7,0" Click="CancelButtonClick"/>
            </StackPanel>
        </Grid>
        <Grid DockPanel.Dock="Top">
            <Image Name="BackButton" Margin="50,58,20,0" Source="/Mosaic.Graphics;component/Hub/back_icon_hub.png" Width="48" HorizontalAlignment="Left" VerticalAlignment="Top" MouseLeftButtonUp="BackButtonMouseLeftButtonUp"/>
            <TextBlock Text="{x:Static Properties:Resources.OptionsTitle}" Foreground="Black" FontSize="76" FontWeight="Light" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="150,20,0,0" TextOptions.TextFormattingMode="Ideal"/>
        </Grid>
        <TabControl Margin="140,10,0,0" Background="Transparent" BorderThickness="0" Style="{StaticResource TabControlStyle}">
            <TabItem Header="{x:Static Properties:Resources.OptionsGeneralTabHeader}" Style="{StaticResource TabItemStyle}">
                <ScrollViewer VerticalScrollBarVisibility="Hidden" MaxWidth="550" HorizontalAlignment="Left">
                    <StackPanel Orientation="Vertical" Margin="10">
                        <TextBlock FontSize="36" FontWeight="Light" Text="{x:Static Properties:Resources.OptionsBehaviour}" Foreground="{StaticResource OptionsBigHeaderColor}" TextOptions.TextFormattingMode="Ideal"/>
                        <CheckBox Name="EnableExclusiveCheckBox" Margin="0,10,0,3" Style="{StaticResource MetroCheckBox}" Content="{x:Static Properties:Resources.OptionsExclusiveMode}"/>
                        <CheckBox Name="EnableAnimationCheckBox" Style="{StaticResource MetroCheckBox}" Content="{x:Static Properties:Resources.OptionsEnableAnimation}"/>
                        <!--<CheckBox Name="EnableThumbBarCheckBox" Style="{StaticResource MetroCheckBox}" Content="{x:Static Properties:Resources.OptionsEnableThumbBar}" Click="CheckBoxClick"/>-->
                        <CheckBox Name="ShowTaskbarCheckBox" Style="{StaticResource MetroCheckBox}" Content="{x:Static Properties:Resources.OptionsShowTaskbar}"/>
                        <CheckBox Name="StartupAnimCheckBox" Style="{StaticResource MetroCheckBox}" Content="{x:Static Properties:Resources.OptionsStartupAnim}"/>
                        <TextBlock FontSize="36" FontWeight="Light" Text="{x:Static Properties:Resources.OptionsAutostart}" Foreground="{StaticResource OptionsBigHeaderColor}" TextOptions.TextFormattingMode="Ideal"/>
                        <CheckBox Name="AutostartCheckBox" Style="{StaticResource MetroCheckBox}" Content="{x:Static Properties:Resources.OptionsAutostartCheckBox}"/>
                    </StackPanel>
                </ScrollViewer>
            </TabItem>
            <TabItem Header="{x:Static Properties:Resources.OptionsUITabHeader}" Style="{StaticResource TabItemStyle}">
                <ScrollViewer VerticalScrollBarVisibility="Hidden" MaxWidth="550" HorizontalAlignment="Left">
                    <StackPanel Orientation="Vertical" Margin="10">
                        <TextBlock FontSize="36" FontWeight="Light" Text="{x:Static Properties:Resources.OptionsUI}" Margin="0,0,0,0" Foreground="{StaticResource OptionsBigHeaderColor}" TextOptions.TextFormattingMode="Ideal"/>
                        <CheckBox Name="ShowMenuButtonCheckBox" Style="{StaticResource MetroCheckBox}" Content="{x:Static Properties:Resources.OptionsMenuButton}"/>
                        <TextBlock Text="{x:Static Properties:Resources.OptionsBg}" Margin="0,5,0,0" FontSize="16" Foreground="Black"/>
                        <DockPanel Margin="0,3,0,0">
                            <Rectangle Name="MosaicBgColor" Fill="Black" Width="36" Height="36" HorizontalAlignment="Left" Stroke="LightGray" StrokeThickness="2"/>
                            <Button Name="ChangeBgColorButton" Style="{StaticResource MetroButton}" Content="{x:Static Properties:Resources.OptionsChange}" Width="125" Height="36" Margin="15,0,7,0" HorizontalAlignment="Left" Click="ChangeBgColorButtonClick"/>
                        </DockPanel>
                        <TextBlock Text="{x:Static Properties:Resources.OptionsBgImage}" Margin="0,5,0,0" FontSize="16" Foreground="Black"/>
                        <DockPanel Margin="0,3,0,0" HorizontalAlignment="Left">
                            <Button Name="BgImageChangeButton" DockPanel.Dock="Right" Style="{StaticResource MetroButton}" Content="{x:Static Properties:Resources.OptionsChange}" MinWidth="125" Margin="20,0,7,0" Click="BgImageChangeButtonClick"/>
                            <TextBox Name="BgImageBox" Style="{StaticResource MetroTextBox}" Width="300" Foreground="Gray"/>
                        </DockPanel>
                        <CheckBox Name="ScrollBgCheckBox" Style="{StaticResource MetroCheckBox}" Margin="0,5,0,0" Content="{x:Static Properties:Resources.OptionsScrollBg}"/>
                        <StackPanel Orientation="Horizontal" Margin="0,7,0,0" >
                            <TextBlock Text="{x:Static Properties:Resources.OptionsBgOpacity}" FontSize="16" Foreground="Black"/>
                            <TextBlock Name="BgOpacityValueTextBlock" Text="5 min." Margin="5,0,3,0" FontWeight="DemiBold" FontSize="16"  Foreground="Black"/>
                        </StackPanel>

                        <Slider Name="BgOpacitySlider" IsEnabled="{Binding ElementName=AutoLockCheckBox, Path=IsChecked}" Margin="0,3,0,0" Value="1" TickPlacement="BottomRight" Minimum="0" Maximum="1" TickFrequency="0.1" SmallChange="0.01" LargeChange="0.1"
                                       IsSnapToTickEnabled="True" IsMoveToPointEnabled="True" ValueChanged="BgOpacitySliderValueChanged"/>

                        <TextBlock FontSize="30" FontWeight="Light" Text="{x:Static Properties:Resources.OptionsLanguage}" Margin="0,15,0,0" Foreground="{StaticResource OptionsBigHeaderColor}" TextOptions.TextFormattingMode="Ideal"/>
                        <ComboBox Name="LanguageComboBox" Margin="0,10,0,0" Style="{StaticResource MetroComboBox}" ItemContainerStyle="{StaticResource MetroComboBoxItem}"/>
                        <TextBlock Text="{x:Static Properties:Resources.OptionsRestart}" Margin="0,3,0,0" Foreground="Gray"/>
                    </StackPanel>
                </ScrollViewer>
            </TabItem>
            <TabItem Header="{x:Static Properties:Resources.OptionsAboutTabHeader}" Style="{StaticResource TabItemStyle}" Foreground="Black" FontSize="16">
                <ScrollViewer VerticalScrollBarVisibility="Hidden" MaxWidth="550" HorizontalAlignment="Left">
                    <Grid Margin="10">
                        <Image Width="70" Source="/Resources/mosaic_logo.png" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,25,10,0" Opacity="1"/>
                        <StackPanel Orientation="Vertical">
                            <TextBlock FontSize="36" FontWeight="Light" Text="{x:Static Properties:Resources.OptionsAbout}" Margin="0,0,0,0" Foreground="{StaticResource OptionsBigHeaderColor}"/>
                            <TextBlock Text="Mosaic Desktop"  Margin="0,7,0,0"/>
                            <TextBlock>
                                <Run Text="{x:Static Properties:Resources.OptionsVersion}"/> 
                                <Run Name="BuildTag" Text="1.0.0.0"/>
                            </TextBlock>
                            <TextBlock Text="Copyright © Stealth 2011"/>
                            <TextBlock Text="{x:Static Properties:Resources.OptionsCopyright}" TextWrapping="Wrap"/>
                            <TextBlock Text="{x:Static Properties:Resources.OptionsAboutIcons}" TextWrapping="Wrap"/>
                            <TextBlock Name="SiteLink" TextWrapping="Wrap" Text="http://mosaicproject.codeplex.com" HorizontalAlignment="Left" MouseLeftButtonUp="SiteLinkMouseLeftButtonUp">
                                <TextBlock.Style>
                                    <Style TargetType="{x:Type TextBlock}">
                                        <Setter Property="Cursor" Value="Hand"/>
                                        <Setter Property="Foreground" Value="#0066CC"/>
                                        <Style.Triggers>
                                            <Trigger Property="IsMouseOver" Value="True">
                                                <Setter Property="TextDecorations" Value="Underline"/>
                                                <Setter Property="Foreground" Value="#3399ff"/>
                                            </Trigger>
                                        </Style.Triggers>
                                    </Style>
                                </TextBlock.Style>
                            </TextBlock>
                        </StackPanel>
                    </Grid>
                </ScrollViewer>
            </TabItem>
        </TabControl>
    </DockPanel>
</Window>
